<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$merchid=$this->checklogin();
$merch=pdo_get('jy_merch_user',array('id'=>$merchid,'uniacid'=>$_SESSION['uniacid']));
$return['plugin_icon']=$merch['logo'];
/*******basic*******/
if($_RQ['op']=='basic'){
	$item['merchlink']='jy_merch/index//merchid='.$merchid;
	$item['shoplink']='jy_merchfuwu/merchshop//merchid='.$merchid;
	$item['shoplink2']='jy_merch/myshop//merchid='.$merchid;
	$item['fuwulink']='jy_mfuwu/index//merchid='.$merchid;
	$item['fuwulink2']='jy_mfuwu/app.index//merchid='.$merchid;
	$item['shifulink']='jy_shifu/index//merchid='.$merchid;
	$item['shifuapplink']='jy_shifu/apply//merchid='.$merchid;
	$item['groups']='jy_merch/shop.group//onemerchid='.$merchid;
	$item['fuwugroups']='jy_mfuwu/app.shop.groups//onemerchid='.$merchid;
	$item['jy_mfee']='jy_mfee/index//onemerchid='.$merchid;
	$item['jy_mteamfee']='jy_mteamfee/index//onemerchid='.$merchid;
	$item['jy_mareafee']='jy_mareafee/index//onemerchid='.$merchid;
	$item['jy_merch2fee']='jy_merch2fee/index//onemerchid='.$merchid;
	$item['jy_bigwheel']='jy_bigwheel/game//onemerchid='.$merchid;
	$item['jy_bargain']='jy_bargain/index//onemerchid='.$merchid;
	$item['jy_pingdd_pin']='jy_pingdd_pin/index//onemerchid='.$merchid;
	$item['jy_zhaopin']='jy_zhaopin/index//onemerchid='.$merchid;
	$item['cart']='jy_merch/member.cart//onemerchid='.$merchid;
	$item['order']='jy_merch/order.list//onemerchid='.$merchid;
	$item['home']='jy_merchfuwu/member.index//onemerchid='.$merchid;
	$return['item']=$item;
	$htmls=array(
		'type'=>'look',
		'desc'=>'入口链接',
		'look'=>array(
			//array('type'=>'copy','title'=>'商户平台','name'=>'merchlink'),
			//array('type'=>'ewm','title'=>'商户平台','name'=>'merchlink'),
			array('type'=>'looklink','title'=>'商户入口','name'=>'shoplink'),
			array('type'=>'looklink','title'=>'服务平台','name'=>'fuwulink'),
			array('type'=>'looklink','title'=>'服务小店入口','name'=>'fuwulink2'),
			array('type'=>'looklink','title'=>'师傅个人中心','name'=>'shifulink'),
			array('type'=>'looklink','title'=>'师傅申请入口','name'=>'shifuapplink'),
			array('type'=>'looklink','title'=>'商品分类入口','name'=>'groups'),
			array('type'=>'looklink','title'=>'服务分类入口','name'=>'fuwugroups'),
			array('type'=>'looklink','title'=>'购物车链接','name'=>'cart'),
			array('type'=>'looklink','title'=>'订单中心链接','name'=>'order'),
			array('type'=>'looklink','title'=>'会员中心链接','name'=>'home'),
		),
	);
	$groupid=$merch['groupid'];
	if($groupid){
		$group=pdo_get('jy_merch_group',array('id'=>$groupid,'uniacid'=>$_SESSION['uniacid']),array('plugins','bankuai','menus'));	
		if(strpos($group['plugins'],';jy_mfee;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'二级分销入口','name'=>'jy_mfee');
		}
		if(strpos($group['plugins'],';jy_mteamfee;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'团队分销入口','name'=>'jy_mteamfee');
		}
		if(strpos($group['plugins'],';jy_mareafee;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'区域代理入口','name'=>'jy_mareafee');
		}
		if(strpos($group['plugins'],';jy_merch2fee;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'出局分润入口','name'=>'jy_merch2fee');
		}
		if(strpos($group['plugins'],';jy_bigwheel;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'大转盘入口','name'=>'jy_bigwheel');
		}
		if(strpos($group['plugins'],';jy_bargain;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'砍价入口','name'=>'jy_bargain');
		}
		if(strpos($group['plugins'],';jy_pingdd_pin;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'拼团入口','name'=>'jy_pingdd_pin');
		}
		if(strpos($group['plugins'],';jy_zhaopin;') !== false){
			$htmls['look'][]=array('type'=>'looklink','title'=>'招聘入口','name'=>'jy_zhaopin');
		}
	}
	$return['htmls']=$htmls;
	exi($return);
}